<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="https://cdn.bootcss.com/echarts/3.8.5/echarts.min.js"></script>
</head>
<body>
	<div id="box" style="width:600px;height:400px"></div>

	<script type="text/javascript">
		// 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('box'));


        var dataDate = ['12-09','12-08','12-07','12-06','2017-12-05','12-04','12-03'];

        var dataNum = [120, 132, 900, 134, 800, 230, 210];

         // 指定图表的配置项和数据
        option = {
		    title: {
		        text: '最近7天用户注册统计'
		    },
		    tooltip: {
		        trigger: 'axis'
		    },
		    legend: {
		        data:['注册量']
		    },
		    grid: {
		        left: '3%',
		        right: '4%',
		        bottom: '3%',
		        containLabel: true
		    },
		    toolbox: {
		        feature: {
		            saveAsImage: {}
		        }
		    },
		    xAxis: {
		        type: 'category',
		        boundaryGap: false,
		        data: dataDate
		    },
		    yAxis: {
		        type: 'value'
		    },
		    series: [
		        {
		            name:'注册量',
		            type:'line',
		            stack: '总量',
		            data:dataNum
		        }
		    ]
		};



        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);

	</script>
</body>
</html>